package com.dh.project.websoket;

import com.dh.project.utils.JsonUtil;

import java.net.URISyntaxException;

/**
 * Created by admin on 2016/12/29.
 */
public class SendUtil {
    public static void sendMessage(WebSocketMsg webSocketMsg){
//        WebSocketMsg webSocketMsg = new WebSocketMsg();
//        webSocketMsg.setShopId(""+0);
//        webSocketMsg.setSuggestContent("管理员"+admin.getAdminName()+"已登录");
        WebSocketUtil mWebSocketClient = null;
        try {
            mWebSocketClient = new WebSocketUtil(JsonUtil.toJson(webSocketMsg));
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        mWebSocketClient.connect();
    }
}
